package com.yao.dao;

import com.yao.entity.ServerEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

@Mapper
public interface ServerDao {
    //    全局查找
    List<ServerEntity> findAll(@Param("server")String server);

    //    分页查找
    List<ServerEntity> findPage(@Param("server")String server,
                                @Param("page") int page,
                                @Param("pageSize") int pageSize);

    //    删除
    void delete(@Param("server")String server,@Param("id")int id);

    //    修改
    void update(
            @Param("server")String server,
            @Param("id")int id,
            @Param("cabinet")String cabinet,
            @Param("positions")String positions,
            @Param("types")String types,
            @Param("stat")String stat,
            @Param("ip")String ip,
            @Param("app")String app,
            @Param("systems")String systems,
            @Param("apptype")String apptype,
            @Param("datas")String datas,
            @Param("numbers")String numbers,
            @Param("brand")String brand,
            @Param("sn")String sn,
            @Param("service")String service,
            @Param("dates")Date dates,
            @Param("cpu")String cpu,
            @Param("amount")String amount,
            @Param("core")String core,
            @Param("ram")String ram,
            @Param("disk")String disk,
            @Param("capacity")String capacity,
            @Param("remain")String remain,
            @Param("used")String used,
            @Param("admin")String admin,
            @Param("department")String department,
            @Param("remark")String remark);

    //    添加
    void add(
            @Param("server")String server,
            @Param("cabinet")String cabinet,
            @Param("positions")String positions,
            @Param("types")String types,
            @Param("stat")String stat,
            @Param("ip")String ip,
            @Param("app")String app,
            @Param("systems")String systems,
            @Param("apptype")String apptype,
            @Param("datas")String datas,
            @Param("numbers")String numbers,
            @Param("brand")String brand,
            @Param("sn")String sn,
            @Param("service")String service,
            @Param("dates")Date dates,
            @Param("cpu")String cpu,
            @Param("amount")String amount,
            @Param("core")String core,
            @Param("ram")String ram,
            @Param("disk")String disk,
            @Param("capacity")String capacity,
            @Param("remain")String remain,
            @Param("used")String used,
            @Param("admin")String admin,
            @Param("department")String department,
            @Param("remark")String remark);

    //    模糊查找
    List<ServerEntity> findBySomething(
            @Param("server")String server,
            @Param("cabinet") String cabinet,
            @Param("types") String types,
            @Param("stat") String stat,
            @Param("ip") String ip,
            @Param("app") String app,
            @Param("systems") String systems,
            @Param("apptype") String apptype,
            @Param("datas") String datas,
            @Param("numbers") String numbers,
            @Param("brand") String brand,
            @Param("sn") String sn,
            @Param("service") String service,
            @Param("startDate") Date startDate,
            @Param("endDate") Date endDate,
            @Param("cpu") String cpu,
            @Param("amount") String amount,
            @Param("core") String core,
            @Param("ram") String ram,
            @Param("disk") String disk,
            @Param("capacity") String capacity,
            @Param("remain")String remain,
            @Param("used")String used,
            @Param("admin") String admin,
            @Param("department") String department);

    //    模糊查找分页
    List<ServerEntity> findByPage(
            @Param("server")String server,
            @Param("cabinet") String cabinet,
            @Param("types") String types,
            @Param("stat") String stat,
            @Param("ip") String ip,
            @Param("app") String app,
            @Param("systems") String systems,
            @Param("apptype") String apptype,
            @Param("datas") String datas,
            @Param("numbers") String numbers,
            @Param("brand") String brand,
            @Param("sn") String sn,
            @Param("service") String service,
            @Param("startDate") Date startDate,
            @Param("endDate") Date endDate,
            @Param("cpu") String cpu,
            @Param("amount") String amount,
            @Param("core") String core,
            @Param("ram") String ram,
            @Param("disk") String disk,
            @Param("capacity") String capacity,
            @Param("remain")String remain,
            @Param("used")String used,
            @Param("admin") String admin,
            @Param("department") String department,
            @Param("page") int page,
            @Param("pageSize") int pageSize);
}
